# Maintainer: Jelle van der Waa <jelle@archlinux.org
# Contributor: Thomas Booker <tw.booker@outlook.com>

libgmobile_commit=f1b50f0f90604e0f125412932dae9b1e08d57ddc

pkgname=phosh-mobile-settings
pkgver=0.33.0
pkgrel=1
pkgdesc='A settings app for mobile specific things'
arch=(loong64 x86_64 aarch64)
url='https://gitlab.gnome.org/guidog/phosh-mobile-settings'
license=(GPL3)
depends=(feedbackd libadwaita lm_sensors phoc phosh)
makedepends=(git meson wayland-protocols)
source=("${url}/-/archive/v${pkgver}/${pkgname}-v${pkgver}.tar.gz"
	https://gitlab.gnome.org/guidog/gmobile/-/archive/${libgmobile_commit}/gmobile-${libgmobile_commit}.tar.gz)
sha256sums=('19271db7a45774bb0c5b1fc25ed8e202e9831e1efd0438766948394b363b7ca0'
            '2f3ac20ae7355216909454f7935120e162f63a960b3f6a9548b936f2cea52c5f')

prepare() {
  mv "gmobile-${libgmobile_commit}" "${pkgname}-v${pkgver}/subprojects/gmobile"
}

build() {
  arch-meson "${pkgname}-v${pkgver}" build
  meson compile -C build
}

package() {
  DESTDIR="${pkgdir}" meson install -C build
}
